<!DOCTYPE html>
<html>
<head>
    <title>${sysEn}-配件子类</title>
     <#include "/common/com_edit_css.ftl" >
</head>
<body>
    <div class="wrapper wrapper-content fadeInRight commoneditpage">
        <div class="row">
            <div class="col-lg-8 m-auto">
                <div class="ibox ">
                    <div class="ibox-title">
                        <h5>${actNm}-配件子类</h5>
                    </div>
                    <div class="ibox-content">
                        <form id="form" action="${ctx}/parts_info_item_edit_submit.do" method="post">
                            <input type="hidden" name="id" id="id" value="${obj.id?c}">
                             <div class="form-group row"><label class="col-lg-2 col-form-label must">配件子类名称：</label>
                                <div class="col-lg-10">
                                    <input type="text" placeholder=""
                                           value="${obj.itemName}"
                                           id="itemName" name="title" class="form-control"
                                           data-message-null="请输入配件子类名称" />
                                </div>
                            </div>
                            <div class="form-group row"><label class="col-lg-2 col-form-label must">配件名称：</label>
                                <div class="col-lg-10">
                                	 <select class="form-control m-b" name="infoId" id="infoId">
                                			<#list partsInfoList as p>
			 									 <#if p.id == obj.infoId >
												    <option value="${p.id}" selected="selected">${p.partsName}</option>
												  <#else>
												   <option value=${p.id}>${p.partsName}</option>	
												  </#if>					
											</#list>
			                            </select>
                                </div>
                            </div>

                            
                             <div class="form-group row">
                                <label class="col-lg-2 col-form-label">产品简述：</label>
                                <div class="col-lg-10">
                            		<script id="uecontainer" name="remarks" type="text/plain"  style="width:800px; height:300px;">${obj.remarks }</script>
                                </div>
                            </div>
                         
                         <div class="form-group row">
                                <label class="col-lg-2 col-form-label">是否启用：</label>
                                <div class="col-lg-10 text-left ">
                                    <div class="i-checks">
                                        <label class="">
                                            <div class="icheckbox_square-green" style="position: relative;">
                                                <input data-easyform="null;" name="status" id="status" type="checkbox" <#if obj.status == 1>checked</#if>  style="position: absolute; opacity: 0;" >
                                                <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                            </div>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            
                         
                            
                            <div class="form-group row">
                                <label class="col-lg-2 col-form-label" >排序：</label>
                                <div class="col-lg-10">
                                    <input type="text" placeholder="" data-easyform="null;"
                                           id="sort"
                                           value="${obj.sort}"
                                           name="sort"
                                           class="form-control" />
                                </div>
                            </div>
                            
     						<@filer_tag attrNm="imageUrl" pWidth="400"  domain="${imgdomain}" url="${obj.imageUrl}" params="typeId=7&key=imageUrl"></@filer_tag>
                           
                            <div class="form-group row ">
                                <div class="col-lg-offset-2 col-lg-10">
                                    <button class="btn btn-sm btn-primary" type="button" id="signBtn" tg="ensure">确定</button>
                                    <button class="btn btn-sm btn-white" type="button" id="cancelBtn" tg="cancel">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <#include "/common/com_edit_js.ftl">
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/js/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
    	var ue = UE.getEditor('uecontainer');
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
        $(document).ready(function () {
            EditPager.init({
                container:$("#form"),
                param:function () {
                    var id = $("#id").val();
                    return {
                        id:id?id:0,
                        itemName:$('#itemName').val(),
                        infoId:$("#infoId option:selected").val(),
                        remarks:ue.getContent(),
                        sort:$("#sort").val(),
                        status:$("#status").is(':checked')?1:0,
                        imageUrl:$("#imageUrl").val()
                    };
                }
            });
        });
      

    </script>
</body>
</html>
